<!DOCTYPE html>
<html>
  <head>
    <script src="../dist/jspsych.js"></script>
    <script src="../dist/plugin-html-keyboard-response.js"></script>
    <link rel="stylesheet" href="../dist/jspsych.css">
  </head>
  <body></body>
  <script>

    var jsPsych = initJsPsych({
      on_finish: function() {
        jsPsych.data.displayData();
      } 
    });

    var first = {
      type: jsPsychHtmlKeyboardResponse,
      stimulus: 'First trial! Experiment will pause for 2s in between trials. Press any key.',
      post_trial_gap: 0,
      on_finish: function() {
        jsPsych.pauseExperiment();
        setTimeout(jsPsych.resumeExperiment, 2000);
      }
    };

    var second = {
      type: jsPsychHtmlKeyboardResponse,
      stimulus: 'Second trial!'
    };

    jsPsych.run([first, second]);

  </script>
</html>
